<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/commons/jsp/taglibs.jsp"%>
<%@taglib uri="http://www.framework.com/taglib/tree" prefix="tree"%>
<form name="addDataForm" id="addHolidayDataForm" method="post" action="${ctx}/framework/holidayset/save">
	<table class="infoTable">
		<tbody>
			<tr>
				<th align="right" width="10%">开始时间</th>
				<td>
					<input id="startTime" class="easyui-datebox" type="text" name="startTime" data-options="validType:['dateTimeLessCompare[\'endTime\']'],required:true" maxlength="20" style="width:140px"/>
				</td>
				<th align="right" width="10%">结束时间</th>
				<td>
					<input id="endTime" class="easyui-datebox" type="text" data-options="validType:['dateTimeMoreCompare[\'startTime\']'],required:true" name="endTime" maxlength="20" style="width:140px"/>
				</td>
			</tr>
		<tr>
		<th align="right" width="10%">类型</th>
			<td>
				<select class="easyui-combobox" name="hoilday_type" id ="hoilday_type" style="width:140px;" data-options="validType:'comboVry'">
					<option value=''>--请选择类型--</option>
					<option value="1">添加公休日期</option>
					<option value="2">添加补班日期</option>
				</select>
			</td>
			<th align="right" width="10%">备注</th>
				<td><input name="descript" class="easyui-testbox" id="descript" size="30" style="width:140px;" data-options="required:true" maxlength="10"/>
				</td>
		</tr>
		</tbody>
	</table>
	<script type="text/javascript">
			$('#addHolidayDataForm').find('#hoilday_type').combobox({
			onSelect: function(){
			var seleted=$('#addHolidayDataForm').find('#hoilday_type').combobox('getValue');
				if(seleted ==2){
					$('#addHolidayDataForm').find('#descript').val('')	;	
				}else if(seleted == 1){
					$('#addHolidayDataForm').find('#descript').val('')	;
				}
				}
			}
			);
			
			$.extend($.fn.validatebox.defaults.rules, {
			    comboVry: {
			        validator: function (value) {//param为默认值
			            return value !="--请选择类型--";
			        },
			        message: '请选择类型'
			    }
			});

		</script>
</form>


